/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2022-10-07
 * Time: 8:46
 */
class Sturdnt implements Comparable<Sturdnt>{
    public String name;
    public  int score;
    public Sturdnt(String name,int score){
        this.name = name;
        this.score = score;
    }

    @Override
    public int compareTo(Sturdnt o) {
        return this.score - o.score;
    }
}
public class Test {
    public static void main(String[] args) {
        Sturdnt s1 = new Sturdnt("大飞",89);
        Sturdnt s2 = new Sturdnt("白糖",90);
        if(s1.compareTo(s2) > 0){
            System.out.println("s1 > s2");
        } else if (s1.compareTo(s2) < 0) {
            System.out.println("s1 > s2");
        }else {
            System.out.println("s1 > s2");
        }
    }
}
